<template>
  <div>
    <h1>App...</h1>
    <p>{{ num }}</p>
    <!-- 以props方式进行通信：以标签属性方式传递数据 -->
    <Child :num="num" :addNum="addNum" xxx="xxx"/>
  </div>
</template>

<script>
import Child from "./views/Child";

export default {
  name: "App",
  data() {
    return {
      num: 0,
    };
  },
  methods: {
    addNum() {
      this.num += 1;
    },
  },
  components: {
    Child,
  },
};
</script>

<style>
</style>
